const { ErrorModel } = require('../model/resModel')

module.exports = (req,res,next)=>{
    if(req.session.username) {
        next()
        return
    }
    res.json(
        newErrorModel('未登录')
    )
}